package com.udaos.modules.trainer.services;

import java.util.List;

import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.IocBean;

import com.udaos.common.base.Service;
import com.udaos.models.trainer.Ud_trainer_project;

/**
 * @author mutaotao
 * @time 2016-12-15 10:36:44
 * 
 */
@IocBean(args = { "refer:dao" })
public class UdTrainerProjectService extends Service<Ud_trainer_project> {

	public UdTrainerProjectService(Dao dao) {
		super(dao);
	}

	@Aop(TransAop.READ_COMMITTED)
	public void save(List<Ud_trainer_project> lists) {
		dao().insert(lists);
	}

	@Aop(TransAop.READ_COMMITTED)
	public void deleteOld(String id) {
		dao().execute(Sqls.create("delete from ud_trainer_project where trainer_id = @id").setParam("id", id));
	}

}